package kr.hayarobee.jaringobi.model.account;

import kr.hayarobee.jaringobi.model.account.rule.AccountPolicy;

public class CashAccount implements Account {
	
	private AccountPolicy policy;
	
	public void setAccountPolicy(AccountPolicy policy) {
		this.policy = policy;
	}

	@Override
	public void deposit(int money) {
		this.policy.add(money);
	}

	@Override
	public int checkBalance() {
		return this.policy.get();
	}

	@Override
	public void withdrawal(int money) {
		this.policy.del(money);
	}

}
